<?php
if(!defined('IN_SONG')) exit('No direct script access allowed');  
/**
 * Class Test Module
 * 
 * @package         Module
 * @subpackage      Test
 * @version         0.1
 * @copyright       Song (c) 2011
 */   
class TestController extends Controller
{
    var $name = 'Test';
                            
    var $helper = array('Test', 'Form');
    function __construct() {
                        
        parent::__construct();    
    }   
    
    public function index(){
        $arrVar = array(
            'var' => 'Template',
            'begin_form' => $this->FormHelper->begin(),
            'end_form' => $this->FormHelper->end()
        );
        $user = $this->Test->test();
        print_r($user);
        $this->Template->setFile('Test', 'test.html');
        $this->Template->setVar($arrVar);
        $this->Template->parse('OUT', 'Test');
        return $this->Template->p('OUT');
    }   
    
    public function display() {
        $arrVar = array('var' => 'TEst'); 
        $this->Template->setFile('Test', 'test.html');
        $this->Template->setVar($arrVar);
        $this->Template->parse('OUT', 'Test');
        return $this->Template->p('OUT');
    }
} 
?>
